module Oos4ruby
class Category
  include Bean
  
  define_attr_reader({
    AtomNamespace => [:term, :scheme],
    OosNamespace => [:frecuency]
  })
  
  def initialize(term, scheme = nil)
    unless term.instance_of?(REXML::Element)
      @term = term
      @scheme = scheme
      @xml = REXML::Element.new 'category'
      @xml.add_attributes 'term' => @term, 'scheme' => @scheme
    else
      @xml = term
    end
  end  
  
  def to_s
    return @xml.to_s
  end
end
end


